import Vue from 'vue'
import Router from 'vue-router'
import login from '@/view/login'
import main from '@/view/main'
import User from '@/view/SysUser/User'
import Role from '@/view/SysRole/Role'
import Menu from '@/view/SysMenu/Menu'
import myInfo from '@/view/SysUser/myInfo'
import Emp from '@/view/Emp/Emp'
import Dept from '@/view/Dept/Dept'
import Clazz from '@/view/Clazz/Clazz'
import Course from '@/view/Course/Course'
import Student from '@/view/Student/Student.vue'
import ClazzCourseTeacher from '@/view/ClazzCourseTeacher/ClazzCourseTeacher'
import EvaluateType from '@/view/EvaluateType/EvaluateType.vue'
import EvaluateTarget from '@/view/EvaluateTarget/EvaluateTarget.vue'
import EvaluateTask from '@/view/EvaluateTask/EvaluateTask.vue'
import EvaluateStudent from '@/view/EvaluateStudent/EvaluateStudent.vue'


Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      component: login
    },
    {
      path: '/main',
      name: main,
      component: main,
      meta: {
        title: "主页",
        keepAlive: true
      },

      children: [{
          path: 'User',
          name: User,
          component: User,
          meta: {
            title: "用户管理",
            keepAlive: true
          }
        },
        {
          path: 'myInfo',
          name: myInfo,
          component: myInfo,
          meta: {
            title: "个人主页",
            keepAlive: true
          }
        },
        {
          path: 'Role',
          name: Role,
          component: Role,
          meta: {
            title: "角色管理",
            keepAlive: true
          }
        },
        {
          path: 'Menu',
          name: Menu,
          component: Menu,
          meta: {
            title: "菜单管理",
            keepAlive: true
          }
        },
      
        {
          path: 'Dept',
          name: Dept,
          component: Dept,
          meta: {
            title: "部门管理",
            keepAlive: true
          },
        },
        {
          path: 'Emp',
          name: Emp,
          component: Emp,
          meta: {
            title: "员工管理",
            keepAlive: true
          },
        },
        {
          path: 'Clazz',
          name: Clazz,
          component: Clazz,
          meta: {
            title: "班级管理",
            keepAlive: true
          },
        }, {
          path: 'Course',
          name: Course,
          component: Course,
          meta: {
            title: "课程管理",
            keepAlive: true
          },
        }, {
          path: 'ClazzCourseTeacher',
          name: ClazzCourseTeacher,
          component: ClazzCourseTeacher,
          meta: {
            title: "课表管理",
            keepAlive: true
          },
        }, {
          path: 'Student',
          name: Student,
          component: Student,
          meta: {
            title: "学生管理",
            keepAlive: true
          },

        }, {
          path: 'EvaluateType',
          name: EvaluateType,
          component: EvaluateType,
          meta: {
            title: "评价类型管理",
            keepAlive: true
          },
        }, {
          path: 'EvaluateTarget',
          name: EvaluateTarget,
          component: EvaluateTarget,
          meta: {
            title: "评价指标管理",
            keepAlive: true
          },

        }, {
          path: 'EvaluateTask',
          name: EvaluateTask,
          component: EvaluateTask,
          meta: {
            title: "评价任务管理",
            keepAlive: true
          },

        }, {
          path: 'EvaluateStudent',
          name: EvaluateStudent,
          component: EvaluateStudent,
          meta: {
            title: "学生评教管理",
            keepAlive: true
          },

        }
      ]
    },
    {
      path: '/login',
      name: login,
      component: login
    },
    //根据用户id查看用户详情
    //在目标vue中使用this.$router.params.xx查看传递的数据
    // {
    //   path: '/selectUserById/:id',
    //   name: selectUserById,
    //   component: selectUserById
    // }
  ]
})